package com.xyy.saas.payment.service;

import com.xyy.saas.payment.dao.model.PayFinanceRefundPlan;
import com.xyy.saas.payment.dao.model.PayFinanceRefundPlanQueryParam;
import com.xyy.saas.payment.dao.model.PinganLoanDetailQuery;
import com.xyy.saas.payment.dao.model.PinganLoanMyLoanQuery;
import com.xyy.saas.payment.dto.PinganLoanCheckAmountDto;
import com.xyy.saas.payment.dto.PinganLoanMyLoanRecordDto;

import java.util.List;
import java.util.Set;

public interface PinganLoanFinanceRefundPlanService {

    Long getTotal(PayFinanceRefundPlanQueryParam planQueryParam);

    List<PayFinanceRefundPlan> queryByPage(PayFinanceRefundPlanQueryParam param);

    int deleteByPrimaryKey(Long id);

    void batchDelete(List<String> ids);

    int insertSelective(PayFinanceRefundPlan record);

    void batchInsert(List<PayFinanceRefundPlan> list);

    PayFinanceRefundPlan selectByPrimaryKey(Long id);

    PayFinanceRefundPlan selectByLoanBalanceNo(String loanBalanceNo);

    Boolean isExist(String loanBalanceNo);

    List<PayFinanceRefundPlan> query(Set<String> loanBalanceNos);

    int updateByPrimaryKeySelective(PayFinanceRefundPlan record);

    int deleteByLoanBalanceNo(String loanBalanceNo);

    List<PayFinanceRefundPlan> pageListByParam(PayFinanceRefundPlanQueryParam planQueryParam);

    int deleteLoan(PayFinanceRefundPlan param);

    /**
     * 查询剩余应还本金
     */
    PayFinanceRefundPlan curPrincipalAmountBalance(String merchantId);

    /**
     * 我的平安贷
     */
    List<PinganLoanMyLoanRecordDto> myLoan(PinganLoanMyLoanQuery param);

    /**
     * 平安贷明细
     */
    List<PayFinanceRefundPlan> loanDetail(PinganLoanDetailQuery pinganLoanDetailQuery);

    /**
     * 平安贷还款计划金额对账，验证平安贷还款计划是否与业务数据金额一致
     */
    List<PinganLoanCheckAmountDto> checkLoanAmount();

}
